package com.zcy.gift.domain;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotations.Version;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 
 * </p>
 *
 * @author zcy
 * @since 2024-01-24
 */
@Data
@Accessors(chain = true)
@TableName("t_tenant")
public class Tenant extends Model<Tenant> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @NotEmpty(message = "公司名不能为空")
    @TableField("company_name")
    private String companyName;

    @NotEmpty(message = "公司编号不能为空")
    @TableField("company_num")
    private String companyNum;

    @TableField("register_time")
    private Date registerTime;
    /**
     * 0待审核，1 审核通过 ， 2审核失败
     */
    private Integer state;

    @NotEmpty(message = "租户地址不能为空")
    private String address;

    @NotEmpty(message = "租户logo不能为空")
    private String logo;
    /**
     * 店铺管理员
     */
    @TableField("admin_id")
    private Long adminId;

    private Employee admin;


    /**
     * 类型id
     */
//    @NotNull(message = "租户类型不能为空")
    @TableField("type_id")
    private Long typeId;

    private TenantType type;

    private List<Long> mealIdList;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
